<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="dart:math library API docs, for the Dart programming language.">
  <title>dart:math library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">
  
</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">shake</a></li>
    <li class="self-crumb">dart:math library</li>
  </ol>
  <div class="self-name">dart:math</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="index.html">shake</a></li>
      <li class="self-crumb">dart:math library</li>
    </ol>
    
    <h5><span class="package-name">shake</span> <span class="package-kind">package</span></h5>
    <ol>
          <li class="section-title">Libraries</li>
          <li><a href="shake/shake-library.html">shake</a></li>
          <li class="section-title">Dart</li>
          <li><a href="dart-ui/dart-ui-library.html">dart:ui</a></li>
          <li class="section-subtitle">Core</li>
            <li class="section-subitem"><a href="dart-async/dart-async-library.html">dart:async</a></li>
            <li class="section-subitem"><a href="dart-collection/dart-collection-library.html">dart:collection</a></li>
            <li class="section-subitem"><a href="dart-convert/dart-convert-library.html">dart:convert</a></li>
            <li class="section-subitem"><a href="dart-core/dart-core-library.html">dart:core</a></li>
            <li class="section-subitem"><a href="dart-developer/dart-developer-library.html">dart:developer</a></li>
            <li class="section-subitem"><a href="dart-math/dart-math-library.html">dart:math</a></li>
            <li class="section-subitem"><a href="dart-typed_data/dart-typed_data-library.html">dart:typed_data</a></li>
          <li class="section-subtitle">VM</li>
            <li class="section-subitem"><a href="dart-io/dart-io-library.html">dart:io</a></li>
            <li class="section-subitem"><a href="dart-isolate/dart-isolate-library.html">dart:isolate</a></li>
    </ol>
  </div>

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1>dart:math library </h1></div>

    <section class="desc markdown">
      <p>Mathematical constants and functions, plus a random number generator.</p>
<p>To use this library in your code:</p>
<pre class="language-dart"><code>import 'dart:math';
</code></pre>
    </section>
    
    <section class="summary offset-anchor" id="classes">
      <h2>Classes</h2>

      <dl>
        <dt id="MutableRectangle">
          <span class="name "><a href="dart-math/MutableRectangle-class.html">MutableRectangle</a><span class="signature">&lt;<wbr><span class="type-parameter">T extends <a href="dart-core/num-class.html">num</a></span>&gt;</span></span>         
        </dt>
        <dd>
          A class for representing two-dimensional axis-aligned rectangles with mutable
properties.
        </dd>
        <dt id="Point">
          <span class="name "><a href="dart-math/Point-class.html">Point</a><span class="signature">&lt;<wbr><span class="type-parameter">T extends <a href="dart-core/num-class.html">num</a></span>&gt;</span></span>         
        </dt>
        <dd>
          A utility class for representing two-dimensional positions.
        </dd>
        <dt id="Random">
          <span class="name "><a href="dart-math/Random-class.html">Random</a></span>         
        </dt>
        <dd>
          A generator of random bool, int, or double values. <a href="dart-math/Random-class.html">[...]</a>
        </dd>
        <dt id="Rectangle">
          <span class="name "><a href="dart-math/Rectangle-class.html">Rectangle</a><span class="signature">&lt;<wbr><span class="type-parameter">T extends <a href="dart-core/num-class.html">num</a></span>&gt;</span></span>         
        </dt>
        <dd>
          A class for representing two-dimensional rectangles whose properties are
immutable.
        </dd>
      </dl>
    </section>


    <section class="summary offset-anchor" id="constants">
      <h2>Constants</h2>

      <dl class="properties">
        <dt id="e" class="constant">
          <span class="name "><a href="dart-math/e-constant.html">e</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Base of the natural logarithms. <a href="dart-math/e-constant.html">[...]</a>
                  
  <div>
            <span class="signature"><code>2.718281828459045</code></span>
          </div>
        </dd>
        <dt id="ln2" class="constant">
          <span class="name "><a href="dart-math/ln2-constant.html">ln2</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Natural logarithm of 2. <a href="dart-math/ln2-constant.html">[...]</a>
                  
  <div>
            <span class="signature"><code>0.6931471805599453</code></span>
          </div>
        </dd>
        <dt id="ln10" class="constant">
          <span class="name "><a href="dart-math/ln10-constant.html">ln10</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Natural logarithm of 10. <a href="dart-math/ln10-constant.html">[...]</a>
                  
  <div>
            <span class="signature"><code>2.302585092994046</code></span>
          </div>
        </dd>
        <dt id="log2e" class="constant">
          <span class="name "><a href="dart-math/log2e-constant.html">log2e</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Base-2 logarithm of <a href="dart-math/e-constant.html">e</a>.
                  
  <div>
            <span class="signature"><code>1.4426950408889634</code></span>
          </div>
        </dd>
        <dt id="log10e" class="constant">
          <span class="name "><a href="dart-math/log10e-constant.html">log10e</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Base-10 logarithm of <a href="dart-math/e-constant.html">e</a>.
                  
  <div>
            <span class="signature"><code>0.4342944819032518</code></span>
          </div>
        </dd>
        <dt id="pi" class="constant">
          <span class="name "><a href="dart-math/pi-constant.html">pi</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          The PI constant.
                  
  <div>
            <span class="signature"><code>3.1415926535897932</code></span>
          </div>
        </dd>
        <dt id="sqrt1_2" class="constant">
          <span class="name "><a href="dart-math/sqrt1_2-constant.html">sqrt1_2</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Square root of 1/2.
                  
  <div>
            <span class="signature"><code>0.7071067811865476</code></span>
          </div>
        </dd>
        <dt id="sqrt2" class="constant">
          <span class="name "><a href="dart-math/sqrt2-constant.html">sqrt2</a></span>
          <span class="signature">&#8594; const <a href="dart-core/double-class.html">double</a></span>
                  </dt>
        <dd>
          Square root of 2.
                  
  <div>
            <span class="signature"><code>1.4142135623730951</code></span>
          </div>
        </dd>
      </dl>
    </section>


    <section class="summary offset-anchor" id="functions">
      <h2>Functions</h2>

      <dl class="callables">
        <dt id="acos" class="callable">
          <span class="name"><a href="dart-math/acos.html">acos</a></span><span class="signature">(<wbr><span class="parameter" id="acos-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns its arc cosine in radians. <a href="dart-math/acos.html">[...]</a>
                  
</dd>
        <dt id="asin" class="callable">
          <span class="name"><a href="dart-math/asin.html">asin</a></span><span class="signature">(<wbr><span class="parameter" id="asin-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns its arc sine in radians. <a href="dart-math/asin.html">[...]</a>
                  
</dd>
        <dt id="atan" class="callable">
          <span class="name"><a href="dart-math/atan.html">atan</a></span><span class="signature">(<wbr><span class="parameter" id="atan-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns its arc tangent in radians. <a href="dart-math/atan.html">[...]</a>
                  
</dd>
        <dt id="atan2" class="callable">
          <span class="name"><a href="dart-math/atan2.html">atan2</a></span><span class="signature">(<wbr><span class="parameter" id="atan2-param-a"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">a</span>, </span> <span class="parameter" id="atan2-param-b"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">b</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          A variant of <a href="dart-math/atan.html">atan</a>. <a href="dart-math/atan2.html">[...]</a>
                  
</dd>
        <dt id="cos" class="callable">
          <span class="name"><a href="dart-math/cos.html">cos</a></span><span class="signature">(<wbr><span class="parameter" id="cos-param-radians"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">radians</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>radians</code> to a <a href="dart-core/double-class.html">double</a> and returns the cosine of the value. <a href="dart-math/cos.html">[...]</a>
                  
</dd>
        <dt id="exp" class="callable">
          <span class="name"><a href="dart-math/exp.html">exp</a></span><span class="signature">(<wbr><span class="parameter" id="exp-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns the natural exponent, <a href="dart-math/e-constant.html">e</a>,
to the power <code>x</code>. <a href="dart-math/exp.html">[...]</a>
                  
</dd>
        <dt id="log" class="callable">
          <span class="name"><a href="dart-math/log.html">log</a></span><span class="signature">(<wbr><span class="parameter" id="log-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns the natural logarithm of the value. <a href="dart-math/log.html">[...]</a>
                  
</dd>
        <dt id="max" class="callable">
          <span class="name"><a href="dart-math/max.html">max</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T extends <a href="dart-core/num-class.html">num</a></span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="max-param-a"><span class="type-annotation">T</span> <span class="parameter-name">a</span>, </span> <span class="parameter" id="max-param-b"><span class="type-annotation">T</span> <span class="parameter-name">b</span></span>)
            <span class="returntype parameter">&#8594; T</span>
          </span>
                  </dt>
        <dd>
          Returns the larger of two numbers. <a href="dart-math/max.html">[...]</a>
                  
</dd>
        <dt id="min" class="callable">
          <span class="name"><a href="dart-math/min.html">min</a></span><span class="signature">&lt;<wbr><span class="type-parameter">T extends <a href="dart-core/num-class.html">num</a></span>&gt;</span><span class="signature">(<wbr><span class="parameter" id="min-param-a"><span class="type-annotation">T</span> <span class="parameter-name">a</span>, </span> <span class="parameter" id="min-param-b"><span class="type-annotation">T</span> <span class="parameter-name">b</span></span>)
            <span class="returntype parameter">&#8594; T</span>
          </span>
                  </dt>
        <dd>
          Returns the lesser of two numbers. <a href="dart-math/min.html">[...]</a>
                  
</dd>
        <dt id="pow" class="callable">
          <span class="name"><a href="dart-math/pow.html">pow</a></span><span class="signature">(<wbr><span class="parameter" id="pow-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span>, </span> <span class="parameter" id="pow-param-exponent"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">exponent</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/num-class.html">num</a></span>
          </span>
                  </dt>
        <dd>
          Returns <code>x</code> to the power of <code>exponent</code>. <a href="dart-math/pow.html">[...]</a>
                  
</dd>
        <dt id="sin" class="callable">
          <span class="name"><a href="dart-math/sin.html">sin</a></span><span class="signature">(<wbr><span class="parameter" id="sin-param-radians"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">radians</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>radians</code> to a <a href="dart-core/double-class.html">double</a> and returns the sine of the value. <a href="dart-math/sin.html">[...]</a>
                  
</dd>
        <dt id="sqrt" class="callable">
          <span class="name"><a href="dart-math/sqrt.html">sqrt</a></span><span class="signature">(<wbr><span class="parameter" id="sqrt-param-x"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">x</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>x</code> to a <a href="dart-core/double-class.html">double</a> and returns the positive square root of the value. <a href="dart-math/sqrt.html">[...]</a>
                  
</dd>
        <dt id="tan" class="callable">
          <span class="name"><a href="dart-math/tan.html">tan</a></span><span class="signature">(<wbr><span class="parameter" id="tan-param-radians"><span class="type-annotation"><a href="dart-core/num-class.html">num</a></span> <span class="parameter-name">radians</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/double-class.html">double</a></span>
          </span>
                  </dt>
        <dd>
          Converts <code>radians</code> to a <a href="dart-core/double-class.html">double</a> and returns the tangent of the value. <a href="dart-math/tan.html">[...]</a>
                  
</dd>
      </dl>
    </section>




  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
    <h5>dart:math library</h5>
    <ol>
      <li class="section-title"><a href="dart-math/dart-math-library.html#classes">Classes</a></li>
      <li><a href="dart-math/MutableRectangle-class.html">MutableRectangle</a></li>
      <li><a href="dart-math/Point-class.html">Point</a></li>
      <li><a href="dart-math/Random-class.html">Random</a></li>
      <li><a href="dart-math/Rectangle-class.html">Rectangle</a></li>
    
    
      <li class="section-title"><a href="dart-math/dart-math-library.html#constants">Constants</a></li>
      <li><a href="dart-math/e-constant.html">e</a></li>
      <li><a href="dart-math/ln2-constant.html">ln2</a></li>
      <li><a href="dart-math/ln10-constant.html">ln10</a></li>
      <li><a href="dart-math/log2e-constant.html">log2e</a></li>
      <li><a href="dart-math/log10e-constant.html">log10e</a></li>
      <li><a href="dart-math/pi-constant.html">pi</a></li>
      <li><a href="dart-math/sqrt1_2-constant.html">sqrt1_2</a></li>
      <li><a href="dart-math/sqrt2-constant.html">sqrt2</a></li>
    
    
      <li class="section-title"><a href="dart-math/dart-math-library.html#functions">Functions</a></li>
      <li><a href="dart-math/acos.html">acos</a></li>
      <li><a href="dart-math/asin.html">asin</a></li>
      <li><a href="dart-math/atan.html">atan</a></li>
      <li><a href="dart-math/atan2.html">atan2</a></li>
      <li><a href="dart-math/cos.html">cos</a></li>
      <li><a href="dart-math/exp.html">exp</a></li>
      <li><a href="dart-math/log.html">log</a></li>
      <li><a href="dart-math/max.html">max</a></li>
      <li><a href="dart-math/min.html">min</a></li>
      <li><a href="dart-math/pow.html">pow</a></li>
      <li><a href="dart-math/sin.html">sin</a></li>
      <li><a href="dart-math/sqrt.html">sqrt</a></li>
      <li><a href="dart-math/tan.html">tan</a></li>
    
    
    
    </ol>
  </div><!--/sidebar-offcanvas-right-->

</main>

<footer>
  <span class="no-break">
    shake 0.1.0
  </span>

  
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
